home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frm5_3_7
- Caption = "Seasons"
- ClientHeight = 1980
- ClientLeft = 2490
- ClientTop = 1725
- ClientWidth = 2310
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 1980
- ScaleWidth = 2310
- Begin VB.PictureBox picNumDays
- Height = 375
- Left = 120
- ScaleHeight = 315
- ScaleWidth = 1995
- TabIndex = 3
- Top = 1440
- Width = 2055
- End
- Begin VB.CommandButton cmdNumDays
- Caption = "Number of Days"
- Default = -1 'True
- Height = 495
- Left = 120
- TabIndex = 2
- Top = 720
- Width = 2055
- End
- Begin VB.TextBox txtSeason
- Height = 285
- Left = 840
- TabIndex = 1
- Top = 240
- Width = 1335
- End
- Begin VB.Label lblSeason
- Alignment = 1 'Right Justify
- Caption = "Season"
- Height = 255
- Left = 0
- TabIndex = 0
- Top = 240
- Width = 735
- End
- Attribute VB_Name = "frm5_3_7"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdNumDays_Click()
- Dim season As String
- 'Determine the number of days in a season
- picNumDays.Cls
- season = txtSeason.Text
- picNumDays.Print season; " has"; NumDays(season); "days."
- End Sub
- Private Function NumDays(season As String) As Integer
- 'Look up the number of days in a given season
- Select Case UCase(season)
- Case "WINTER"
- NumDays = 87
- Case "SPRING"
- NumDays = 92
- Case "SUMMER", "AUTUMN", "FALL"
- NumDays = 93
- End Select
- End Function
-